#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>
int main()
{
  umask(0);
  int fd=open("/dev/pts/1",O_TRUNC|O_WRONLY,0666);
  if(fd<0) return 1;
  dup2(fd,1);
  printf("hello linux!\n");
  fprintf(stdout,"hello linux!\n");
  fflush(stdout);
  return 0;
}
